<?php

add_action('init','of_options');

if (!function_exists('of_options')) {
function of_options(){

//Theme Shortname
$shortname = "ahed";


//Populate the options array
global $tt_options;
$tt_options = get_option('of_options');


//Access the WordPress Pages via an Array
$tt_pages = array();
$tt_pages_obj = get_pages('sort_column=post_parent,menu_order');
foreach ($tt_pages_obj as $tt_page) {
$tt_pages[$tt_page->ID] = $tt_page->post_name; }
$tt_pages_tmp = array_unshift($tt_pages, "Select a page:");


//Access the WordPress Categories via an Array
$tt_categories = array();
$tt_categories_obj = get_categories('hide_empty=0');
foreach ($tt_categories_obj as $tt_cat) {
$tt_categories[$tt_cat->cat_ID] = $tt_cat->cat_name;}
$categories_tmp = array_unshift($tt_categories, "Select a category:");


//Sample Array for demo purposes
$sample_array = array("1","2","3","4","5");


//Sample Advanced Array - The actual value differs from what the user sees
$sample_advanced_array = array("image" => "The Image","post" => "The Post");


//Folder Paths for "type" => "images"
$sampleurl =  get_template_directory_uri() . '/admin/images/sample-layouts/';










/*-----------------------------------------------------------------------------------*/
/* Create The Custom Site Options Panel
/*-----------------------------------------------------------------------------------*/
$options = array(); // do not delete this line - sky will fall

//Access the WordPress Pages via an Array

/*Option site social */

$options[] = array( "name" => 'Social options',
			"type" => "heading");
$options[] = array( "name" => 'Facebook',
			"desc" => 'URI to your facebook page or fan page',
			"id" => $shortname."_facebook",
			"std" => "http://www.facebook.com",
			"type" => "text");
			
$options[] = array( "name" => 'Twitter',
			"desc" => 'URI to your twitter page or fan page',
			"id" => $shortname."_twitter",
			"std" => "http://www.twitter.com",
			"type" => "text");


/* Option Page 1 - All Options */
$options[] = array( "name" => 'Address options',
			"type" => "heading");

$options[] = array( "name" => 'Address',
			"desc" => 'Your address',
			"id" => $shortname."_address",
			"std" => "351 East Main Street Hill City, SD 57745",
			"type" => "text");
$options[] = array( "name" => 'Email',
			"desc" => 'Your email',
			"id" => $shortname."_email",
			"std" => "info@flysigma.com",
			"type" => "text");

$options[] = array( "name" => 'Website',
			"desc" => 'Your website',
			"id" => $shortname."_website",
			"std" => "www.flysigma.com",
			"type" => "text");
			
					
$options[] = array( "name" => 'Phone',
			"desc" => 'Your phone',
			"id" => $shortname."_phone",
			"std" => " (11233)493489",
			"type" => "text");
$options[] = array( "name" => 'MT4 Admin',
			"desc" => 'MT4 Admin',
			"id" => $shortname."_emailMT4",
			"std" => "eurasia@gmail.com",
			"type" => "text");
$options[] = array( "name" => 'Agent  for MT4 ',
			"desc" => 'MT4 Admin',
			"id" => $shortname."_agent",
			"std" => "3000",
			"type" => "text");


/* Option Page 1 - All Options */
$options[] = array( "name" => 'Paypal',
			"type" => "heading");

$options[] = array( "name" => 'Api Username',
			"desc" => 'Your api username',
			"id" => $shortname."_usernamePaypal",
			"std" => "",
			"type" => "text");
$options[] = array( "name" => 'Api Password',
			"desc" => 'Your api password',
			"id" => $shortname."_passwordPaypal",
			"std" => "",
			"type" => "text");

$options[] = array( "name" => 'Api Signature',
			"desc" => 'Your api signature',
			"id" => $shortname."_signaturePaypal",
			"std" => "",
			"type" => "text");

$options[] = array( "name" => 'Sanbox Mode',
			"desc" => 'Choose mode for paypal',
			"id" => $shortname."_sandboxPaypal",
			"std" => "1",
			"type" => "select",
			"options" => array('yes','no'));

/* Option Page 1 - Advance */
//$options[] = array( "name" => __('Advertisement','framework_localize'),
//			"type" => "heading");
//
//$options[] = array( "name" => __('Title 1','framework_localize'),
//			"desc" => "This is the Your footer .",
//			"id" => $shortname."_title1",
//			"std" => "",
//			"type" => "text"
//            );
//
//$options[] = array( "name" => __('Image 1','framework_localize'),
//			"desc" => __('Upload a custom logo for your Website.','framework_localize'),
//			"id" => $shortname."_image1",
//			"std" => "",
//			"type" => "upload");
//
//$options[] = array( "name" => __('Title 2','framework_localize'),
//			"desc" => "This is the Your footer .",
//			"id" => $shortname."_title2",
//			"std" => "",
//			"type" => "text"
//            );
//
//$options[] = array( "name" => __('Image 2','framework_localize'),
//			"desc" => __('Upload a custom logo for your Website.','framework_localize'),
//			"id" => $shortname."_image2",
//			"std" => "",
//			"type" => "upload");
//
//$options[] = array( "name" => __('Title 3','framework_localize'),
//			"desc" => "This is the Your footer .",
//			"id" => $shortname."_title3",
//			"std" => "",
//			"type" => "text"
//            );
//
//$options[] = array( "name" => __('Image 3','framework_localize'),
//			"desc" => __('Upload a custom logo for your Website.','framework_localize'),
//			"id" => $shortname."_image3",
//			"std" => "",
//			"type" => "upload");










update_option('of_template',$options);
update_option('of_themename',$themename);
update_option('of_shortname',$shortname);

}
}
?>